<?php defined('IN_NWIDC') or exit('Access Invalid!');?> 
<link href="<?php echo SHOP_TEMPLATES_URL;?>/css/base.css" rel="stylesheet" type="text/css">
<link href="<?php echo SHOP_TEMPLATES_URL;?>/css/home_header.css" rel="stylesheet" type="text/css">
<link href="<?php echo SHOP_TEMPLATES_URL;?>/css/member_login.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="/shop/templates/mln/font/css/font-awesome.css">
<style>
    body {
    <?php $item = tpl_get("基本设置");?> background: <?php echo $item[0]['color']?> !important;
    }
</style>
<style>
  .nc-login-layout{
    width: 940px;
    padding: 40px;
    background:#fff;
    border-radius: 5px;
  }
  .nc-login-layout .left-pic{
    float: right;
    width: 400px;
  }
  .nc-login{
    float: left;
    border:0;
    width: 460px;
    padding: 39px 39px 49px 39px;
  }
  .tabs-nav li{
    text-align: left;
    line-height: 40px;
  }
  .tabs-nav li h3{
    font-size: 30px;
    color:#000;
    font-weight: bold;
  }
  .tabs-nav li span{
    font-size: 14px;
  }
  .tabs-nav li span a,.tabs-nav li span a:hover{
    font-size: 14px;
    color:#ff731a;
  }
  .tabs-nav li._last{
    text-align: right;
  }
  .tabs-nav{
    border-bottom:0;
  }
  .nc-login .tabs-container{
    padding: 0;
  }
  .nc-login .nc-login-form dl{
    width: 468px;
    border:0;
    border-bottom:1px solid #E6E6E6;
    margin-top: 0;
  }
  .nc-login-form dl dt{
    padding-bottom: 3px;
    padding-top: 29px;
    padding-left: 5px;
    width: 30px;
  }
  .nc-login-form dl dt i{
    font-size: 18px;
    color:#999;
  }
  .nc-login-form dl dd{
    padding: 0;
    padding-top: 24px;
  }
  .nc-login .tabs-content{
    width: 472px;
  }
  .nc-login .nc-login-form dl dd .text{
    width: 420px;
  }
  .handle-div{
    font-size: 14px;
  }
  .nc-login .nc-login-form .submit-div .submit{
    width: 228px;
  }
  .nc-login-form .submit-div .submit{
    height: 35px;
    font-weight: normal;
    background-color: #ff751a;
    border: solid 1px #ff751a;
  }
  .left-pic{
    text-align: right;
    padding-top: 9px;
  }
  .left_content{
    float: right;
    width: 240px;
    text-align: center;
  }
  ._title h3{
    font-size: 20px;
    font-weight: bold;
    color:#000;
    height: 30px;
    line-height: 30px;
  }
  ._line{
    height: 36px;
    /*padding-left: 30px;*/
    width: 200px;
    margin-left: 20px;
  }
  ._line_left,._line_right{
    float: left;
    height: 18px;
    border-bottom:1px solid #b8b8b8;
    width: 40px;
  }
  ._line_middle{
    float: left;
    width: 120px;
    height: 36px;
    line-height: 36px;
    font-size: 14px;
    color: #999;
  }
  ._signin_icon{
    width: 200px;
    margin-left: 20px;
    margin-top: 5px;
  }
  ._qq,._weibo,._weixin{
    float: left;
    width: 100px;
  }
  ._qq div,._weibo div,._weixin div{
    width: 64px;
    height: 64px;
    border-radius: 100px;
    margin-left: 15px;
    line-height: 80px;
  }
  ._qq div{
    background:url(/shop/templates/mln/images/qq.png) no-repeat center;
    border-radius:0;
  }
  ._weibo div,._weixin div{
    border:2px solid #cdcdcd;
  }
  .icon-weibo{
    font-size: 36px;
    color:#71c9a3;
  }
  .a1{
    display: block;
    width: 64px;
    height: 64px;
  }
  .a3:hover{
    text-decoration: none;
  }
  body #footer{
    display: block !important;
    border-top: 0 !important;
  }
  .fa-weixin{
    font-size: 36px;
    color:#72c8a1;
  }
</style>
<div class="logon wrapper" style="width:1020px;height:100px;padding-top:10px;">
    <?php
    $img = tpl_get("logo");
    ?>
    <a href="<?php echo $img['link'] ?>">
        <img src="<?php echo $img['pic'] ?>" alt="" style="width: 160px;height: 100px;float: left;">
    </a>
</div>
<div class="nc-login-layout">
  <div class="left-pic">
    <div class="left_content">
      <div class="_title">
        <h3>第三方帐号登录</h3>
      </div>
      <div class="_line">
        <div class="_line_left"></div>
        <div class="_line_middle">
          Sign in with
        </div>
        <div class="_line_right"></div>
      </div>
      <div class="_signin_icon">
        <?php if ($output['setting_config']['qq_isuse'] == 1){?>

          <div class="_qq">
            <div>
              <a href="<?php echo SHOP_SITE_URL;?>/api.php?act=toqq" class="a1" title="QQ"></a>
            </div>
          </div>
        <?php }?>

        <?php if ($output['setting_config']['sina_isuse'] == 1){?>

        <div class="_weibo">
            <div>
            <a href="<?php echo SHOP_SITE_URL;?>/api.php?act=tosina" class="a3" title="新浪微博">
              <i class="icon-weibo"></i>
              </a>
            </div>
          </div>
        <?php }?>

        <div class="_weixin">
            <div>
            <?php
                require_wechat();
                require_once(dirname(BASE_PATH) . '/wxpay/lib/WxPay.Config.php');
                $wechat = new WeChat(-1);
                $redirect = urlencode('http://' . $_SERVER['HTTP_HOST'] . '/shop/index.php?act=login&op=wechat_login');
                if(isset($_SESSION['wechat_openid'])){
                    if(time() - $_SESSION['wechat_openid']['time'] < 300){
            ?>
            <script>
                $('[name=ref_url]').val('');
            </script>
            <?php
                    }
                }
                $url = "https://open.weixin.qq.com/connect/qrconnect?appid={$wechat->config['open_appid']}&redirect_uri={$redirect}&response_type=code&scope=snsapi_login&state=STATE#wechat_redirect";
            ?>
            <a href="<?php echo $url;?>" class="a6" title="微信"><i class="fa fa-weixin"></i></a>
              <?php //}?>
            </div>
          </div>
          <div class="clear"></div>
      </div>
    </div>
  </div>
  <div class="nc-login">
  <div class="arrow"></div>
    <div class="nc-login-mode">
      <ul class="tabs-nav">
        <li><h3><?php echo "登录";?></h3>
            
        </li>
        <li class="_last">
          <span>还没有帐号？<a href="index.php?act=login&op=register">马上注册</a></span>
        </li>
      </ul>
      <div id="tabs_container" class="tabs-container">
        <div id="default" class="tabs-content">
          <form id="login_form" class="nc-login-form" method="post" action="<?php echo SHOP_SITE_URL;?>/index.php?act=login&op=login">
            <?php Security::getToken();?>
            <input type="hidden" name="form_submit" value="ok" />
            <input name="nchash" type="hidden" value="<?php echo getNchash();?>" />
            <dl>
              <dt><i class="icon-user"></i></dt>
              <dd>
                <input type="text" class="text" autocomplete="off"  name="user_name" tipMsg="用户名/邮箱/已验证手机" id="user_name" placeholder="请输入用户名"  >
              </dd>
            </dl>
            <dl>
              <dt><i class="icon-lock"></i></dt>
              <dd>
                <input type="password" class="text" name="password" autocomplete="off" tipMsg="<?php echo $lang['login_register_password_to_login'];?>" id="password" placeholder="请输入密码">
              </dd>
            </dl>
            <div style="height:50px;position:relative;"></div>
            <div class="handle-div">
            <span class="auto"><input type="checkbox" class="checkbox" name="auto_login" value="1">自动登录<em style="display: none;">请勿在公用电脑上使用</em></span>
            <a class="forget" href="index.php?act=login&op=forget_password"><?php echo $lang['login_index_forget_password'];?></a></div>
            <div class="submit-div">
              <input type="submit" class="submit" value="<?php echo "确认登录";?>">
              <input type="hidden" value="<?php echo $_GET['ref_url']?>" name="ref_url">
            </div>
          </form>
        </div>
      </div>
    </div>
    <!-- <div class="nc-login-api" id="demo-form-site">
      <?php if (C('qq_isuse') == 1 || C('sina_isuse') == 1 || C('weixin_isuse') == 1){?>
      <h4><?php echo $lang['nc_otherlogintip'];?></h4>
      <?php if (C('qq_isuse') == 1){?>
      <a href="<?php echo SHOP_SITE_URL;?>/api.php?act=toqq" title="QQ账号登录" class="qq"><i></i>QQ</a>
      <?php } ?>
      <?php if (C('sina_isuse') == 1){?>
      <a href="<?php echo SHOP_SITE_URL;?>/api.php?act=tosina" title="新浪微博账号登录" class="sina"><i></i>新浪微博</a>
      <?php } ?>
      <?php if (C('weixin_isuse') == 1){?>
      <a href="javascript:void(0);" onclick="ajax_form('weixin_form', '微信账号登录', '<?php echo SHOP_SITE_URL;?>/index.php?act=connect_wx&op=index', 360);" title="微信账号登录" class="wx"><i></i>微信</a>
      <?php } ?>
      <?php } ?>
    </div> -->
  </div>
  <div class="clear"></div>
</div>
<script>
$(function(){
    // 勾选自动登录显示隐藏文字
    $('input[name="auto_login"]').click(function(){
        if ($(this).attr('checked')){
            $(this).attr('checked', true).next().show();
        } else {
            $(this).attr('checked', false).next().hide();
        }
    });
    $('.submit').click(function(){
      var flag = true;
      if($('input[name="user_name"]').val() == ""){
        layer.msg("用户名不能为空");
        flag = false;
        return false;
      }
      if($('input[name="password"]').val() == ""){
        layer.msg("密码不能为空");
        flag = false;
        return false;
      }
      if(flag){
        $('#login_form').submit();
      }
    })
});
</script>
<script src="/data/resource/layer/layer.js"></script>
<?php if (C('sms_login') == 1){?>
<script type="text/javascript" src="<?php echo SHOP_RESOURCE_SITE_URL;?>/js/connect_sms.js" charset="utf-8"></script>
<script>
$(function(){

});
</script>
<?php } ?>